package com.quik.web.front.service;

import java.util.List;

import com.quik.entity.DtaProduct;
import com.quik.entity.Room;

/**
 * 功能说明：
 *        处理咨客-房间的业务逻辑
 * @author jenny
 *
 */
public interface ConsultRoomService {
	/**
	 * 查询房间类型列表
	 * @return
	 * @throws Exception
	 */
	public List findRoomTypeList() throws Exception;
	
	/**
	 * 查询房间区域列表
	 * @return
	 * @throws Exception
	 */
	public List findRoomAreaList() throws Exception;
	
	/**
	 * 获取房间状态列表
	 * @return
	 * @throws Exception
	 */
	public List findRoomStatusList() throws Exception;
	
	/**
	 * 根据条件查询房间列表
	 * @param roomType 房间类型ID
	 * @param roomArea  房间区域ID
	 * @param status  房间状态
	 * @return
	 * @throws Exception
	 */
	public List findRoomList(Integer roomType, Integer roomArea, String status) throws Exception;
	
	/**
	 * 查询房间状态统计
	 * @return
	 * @throws Exception
	 */
	public List findRoomStatList() throws Exception;
	
	/**
	 * 根据房间ID查询房间
	 * @param roomId
	 * @return
	 * @throws Exception
	 */
	public Room findRoomById(Integer roomId) throws Exception;
	
	/**
	 * 根据房间ID查询绑定的商品信息
	 * @param roomId
	 * @return
	 * @throws Exception
	 */
	public DtaProduct findProductByRoomId(Integer roomId) throws Exception;
	
	/**
	 * 手牌开房间
	 * @param tokenNo
	 * @param roomId
	 * @param staff_no
	 * @param qty
	 * @throws Exception
	 */
	public void openRoom(String tokenNo, String roomNo, String productNo, String service, String chess, Integer qty, String staff_no) throws Exception;
	
	/**
	 * 无手牌开房间
	 * @param roomNo
	 * @param productNo
	 * @param service
	 * @param chess
	 * @param staffNo
	 * @param qty
	 * @return 返回biz_billing_item的ID, 无产品消费项时返回0
	 * @throws Exception
	 */
	public void openRoomNoToken(String contactStaffNo, String roomNo, String productNo, String service, String chess, Integer qty, String staffNo) throws Exception;
	
	/**
	 * 判断是否满足交换房间的条件
	 * @param srcRoom
	 * @param newRoom
	 * @return
	 * @throws Exception
	 */
	public boolean isExchanged(String srcRoom, String newRoom) throws Exception;
	
	/**
	 * 交换房间
	 * @param srcRoom
	 * @param newRoom
	 * @param staffNo
	 * @throws Exception
	 */
	public void exchangeRoom(String srcRoom, String newRoom, String staffNo) throws Exception;
	
	/**
	 * 根据条件查询房间数量
	 * @param roomNo
	 * @param roomType
	 * @param roomArea
	 * @param status
	 * @return
	 * @throws Exception
	 */	
	public int findRoomCount(String roomNo, Integer roomType, Integer roomArea, String status) throws Exception;
	
	/**
	 * 根据条件查询房间列表（分页）
	 * @param roomNo
	 * @param roomType
	 * @param roomArea
	 * @param status
	 * @param intPage
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */	
	public List findRoomList(String roomNo, Integer roomType, Integer roomArea, String status, Integer intPage, Integer pageSize) throws Exception;
	
	/**
	 * 判断房间是否存在及已开房
	 * @param roomNo
	 * @return
	 * @throws Exception
	 */
	public boolean isRoom(String roomNo) throws Exception;
	
	/**
	 * 关联房间
	 * @param boundRoom
	 * @param relateRoom
	 * @param staffNo
	 * @throws Exception
	 */
	public void relateByRoom(String boundRoom, String[] relateRoom, String staffNo) throws Exception;
	
	/**
	 * 判断是否可以预订（规则：确认同一天不允许预订两次）
	 * @param roomId
	 * @param bookingDate
	 * @return
	 * @throws Exception
	 */	
	public boolean isBook(Integer roomId, String bookingDate) throws Exception;
	
	/**
	 * 预订房间
	 * @param roomId
	 * @param userName
	 * @param userMobile
	 * @param bookingDate
	 * @param staffNo
	 * @throws Exception
	 */
	public void bookingRoom(Integer roomId, String userName, String userMobile, String bookingDate, String staffNo) throws Exception;
}
